/*
 * @Author: zhangwei 1405298045@qq.com
 * @Date: 2022-03-31 14:54:49
 * @LastEditTime: 2022-08-26 11:21:48
 * @LastEditors: zhangwei 1405298045@qq.com
 * @Description:
 * @FilePath: /ll-fe-mp-dyfx/src/api/order.js
 *
 */
import http from '@/service';
import { GET, POST } from '@/service';

// 探店列表 todo token失效时间过快，是否更换get封装方法
export function tdSeekApply(params) {
	return http.request({
		url: '/api/tdSeekApply/mySeek',
		method: 'get',
		params
	});
}

// 探店详情
export function tdSeekApplyDetail(params) {
	return http.request({
		url: '/api/tdSeekApply/detail',
		method: 'get',
		params
	});
}

// 确认价格
export function tdSeekApplyConfirmPrice(params) {
	return http.request({
		url: '/api/tdSeekApply/confirmPrice',
		method: 'get',
		params
	});
}

// 探店详情提交
export function agentShopOrderCommit(params) {
	const url = '/api/tdSeekApply/finishTd';
	return POST(url, params);
}
//取消申请
export function cancelAgentShopApply(params) {
	return http.request({
		url: '/api/tdSeekApply/cancelPrice',
		method: 'get',
		params
	});
}
//素材列表
export function getMaterialOrderList(params) {
	return http.request({
		url: '/api/tdOrder/resourceOrder/page',
		method: 'post',
		params
	});
}

/**
 * 探店订单取消
 * @param {*} params
 * @returns
 */
export const cancelExploreStore = (params) => {
	const url = '/api/tdSeekApply/cancel';
	return POST(url, params, {
		custom: {
			isFrom: true
		}
	});
};

/**
 * 素材订单取消
 * @param {*} params
 * @returns
 */
export const cancelExploreMaterial = (params) => {
	const url = '/api/tdOrder/resourceOrder/cancel';
	return POST(url, params, {
		custom: {
			isFrom: true
		}
	});
};
